dy-lib = libmymath.so

$(dy-lib):Add.o Sub.o Mul.o
	gcc -shared -o $@ $^
%.o:%.c
	gcc -c -fPIC $<

.PHONY:output
output:
	mkdir -p mymath_lib/include  # include 里面存放 .h 文件
	mkdir -p mymath_lib/lib		 # lib里面存放 .a 文件
	cp -f *.h mymath_lib/include
	cp -f *.so mymath_lib/lib
.PHONY:clean
clean:
	rm -f -d -r *.o *.so mymath_lib
